<?
$year1 = $_POST['year1'];
$month1 = $_POST['month1'];
$day1 = $_POST['day1'];
$hour1 = $_POST['hour1'];
$year_month_date_hour1 = $year1 . "-" . $month1 . "-" . $day1 . " " . $hour1 .
    ":00";

$year2 = $_POST['year2'];
$month2 = $_POST['month2'];
$day2 = $_POST['day2'];
$hour2 = $_POST['hour2'];
$year_month_date_hour2 = $year2 . "-" . $month2 . "-" . $day2 . " " . $hour2 .
    ":00";

$year3 = $_POST['year3'];
if ($year3 == '')
    $year3 = date("Y");
$month3 = $_POST['month3'];
if ($month3 == '')
    $month3 = date("m");
$day3 = $_POST['day3'];
if ($day3 == '')
    $day3 = date("d");
$hour3 = $_POST['hour3'];
if ($hour3 == '')
    $hour3 = date("H");
$year_month_date_hour3 = $year3 . "-" . $month3 . "-" . $day3 . " " . $hour3 .
    ":00";
?>